<template>
  <transition v-bind:css="false" name="fade">
    <router-view></router-view>
  </transition>
</template>

<script>
import followUpInfoService from '@/api/follow/followUpInfoService'
import Vue from 'vue'

export default {
  created () {
    setInterval(this.myTask, 5000)
  },
  methods: {
    myTask () {
      if (Vue.cookie.get('token') != null) {
        followUpInfoService.getMyTask().then(res => {
          if (res.data !== '' && res.data !== null) {
            this.$notify({
              title: '提示',
              message: res.data,
              duration: 0
            })
          }
        })
      }
    }
  }
}
</script>
<style scoped>
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

</style>
